home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / comms_w / wrcmdl13.zip / CRSH.ZIP / WINIO.H < prev    next >
C/C++ Source or Header  |  1994-03-20  |  2KB  |  68 lines

  1. /*
  2. WINIO.H
  3. Stdio (e.g. printf) functionality for Windows - definition
  4. Dave Maxey - 1991
  5. */
  6.  
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /* ==== STDIO.H for Windows ==== */
  11. #include <stdarg.h>
  12. #include <stdio.h>
  13.  
  14. #undef putchar
  15. #define putchar fputchar
  16. #undef getchar
  17. #define getchar fgetchar
  18.  
  19. /* ==== Extensions ==== */
  20.  
  21. /* winio_init() must be called before any of the above listed
  22. functions to init the i/o window. Similar arguments to WinMain(), but
  23. we drop the cmdline pointer but add a bufsize parameter (unsigned) -
  24. 0 means default (8k). */
  25. int winio_init(HANDLE, HANDLE, int, unsigned);
  26.  
  27. /* Makes the window inactive, and allows the user to view and play with
  28. it until double- clicking on the system menu to close it. NEVER RETURNS. */
  29. void winio_end(void);
  30.  
  31. /* closes the window immediately and frees up buffers */
  32. void winio_close(void);
  33.  
  34. /* to override default title of "Console I/O" */
  35. void winio_settitle(BYTE *);
  36.  
  37. /* May be SYSTEM_FIXED_FONT (default), ANSI_FIXED_FONT, or OEM_FIXED_FONT */
  38. BOOL winio_setfont(WORD);
  39.  
  40. /* To turn automatic updating of window off and on */
  41. BOOL winio_setpaint(BOOL);
  42.  
  43. /* clear out the contents of the buffer and start over fresh */
  44. void winio_clear(void);
  45.  
  46. /* should be used to release cpu in spells between I/O calls. A
  47. WM_QUIT message received by it will exit the application. If that is
  48. a problem, use the winio_onclose function below */
  49. void winio_yield(void);
  50.  
  51. /* Returns the underlying Windows window handle to WINIO window */
  52. HWND winio_hwnd(void);
  53.  
  54. /* ==== User definable exit routine ==== */
  55.  
  56. typedef void (* DESTROY_FUNC)(void);
  57.  
  58. /* Optional notification function; without it, there is no way for your
  59. application to know if the user has double-clicked the system menu box */
  60. void winio_onclose(DESTROY_FUNC);
  61.  
  62. /* ==== Utility function built on message box ==== */
  63.  
  64. BOOL winio_warn(BOOL, const BYTE *, ...);
  65. #ifdef __cplusplus
  66. }
  67. #endif
  68.